package com.ss.SmartStock.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ss.SmartStock.pojo.dto.product.ProductAddRequest;
import com.ss.SmartStock.pojo.dto.product.ProductQueryAllRequest;
import com.ss.SmartStock.pojo.dto.product.ProductQueryRequest;
import com.ss.SmartStock.pojo.entity.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ss.SmartStock.pojo.vo.ProductQueryVO;
import org.apache.ibatis.annotations.Select;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2024-06-17
 */
public interface ProductService extends IService<Product> {

    /**
     * 查询所有商品基本信息
     */
    List<Product> selectAllProduct();

    /**
     * 根据商品详情表id查找商品基本信息
     */
    Product selectProductBypdid(Long id);


    /**
     * 根据操作人id查询所有商品基本信息
     * @param id
     * @return
     */
    List<Product> selectAllProductById(Long id);


    /**
     * 获取查询条件
     */
    QueryWrapper<Product> getQueryWrapper(ProductQueryRequest productQueryRequest);

    Page<ProductQueryVO> getProductVOPage(Page<Product> productPage, HttpServletRequest httpServletRequest);

    Product getByDetailId(Long pDetailsId);

    void putProductOnline(long productId);

    void takeProductOffline(long productId);
}
